package com.jmx.demo;

/**
 * getter、setter设置属性 其他方法操作属性
 *
 * MMP实现类要去掉接口MBean
 *
 * @author Lizhong
 * @date 2019/4/24
 */
public class HelloWorld implements HelloWorldMBean {
    private String greeting;
    private String name;


    public HelloWorld(String greeting) {
        this.greeting = greeting;

    }

    public HelloWorld() {
        this.greeting = "hello world!";
        this.name = "张三";
    }

    public String getGreeting() {
        return greeting;
    }
   public String getName() {
        return name;
    }

    public void setGreeting(String greeting) {
        this.greeting = greeting;
    }

    public void printGreeting() {
        System.out.println(greeting);
    }

    @Override
    public void printName() {
        System.out.println(this.name);
    }
}
